<?php
declare (strict_types=1);

namespace app\command;

use app\admin\model\base\SysConfig;
use job\RabbitmqJob;
use think\console\Command;
use think\console\Input;
use think\console\Output;

/**
 * RabbitmqEmqx消费者
 */
class RabbitmqJobReceive extends Command
{
    protected function configure()
    {
        // 指令配置
        $this->setName('RabbitmqJobReceive')->setDescription('RabbitmqJobReceive消费者');
    }

    protected function execute(Input $input, Output $output)
    {
        //加载系统配置
        SysConfig::cleanUpConfig();
        SysConfig::loadConfig();
        $run = RabbitmqJob::getInstance();
        $run->receive('RabbitmqJobReceive');
    }

}
